package org.cerberus.platform.share;

public final class RealInteger {

	private Integer wrapped;
	
	public RealInteger(Integer wrapped) {
		this.wrapped = wrapped;
		if (this.wrapped == null) {
			throw new NullPointerException();
		}
	}
	
	public Integer getWrappedInteger() {
		return wrapped;
	}
	
	@Override
	public String toString() {
		return wrapped.toString();
	}
	
	@Override
	public boolean equals(Object obj) {
		return wrapped.equals(obj);
	}
	
	@Override
	public int hashCode() {
		return wrapped.hashCode();
	}
	
	public static RealInteger valueOf(Integer val) {
		// possibly implement caching
		return new RealInteger(val);
	}
	
}
